package me.chan.time;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class LocalDateTimeDemo {

	public static void main(String[] args) {
		/*LocalDate localDate = LocalDate.of(2017, 3, 27);
		int year = localDate.getYear();
		int month = localDate.getMonthValue();
		int day = localDate.getDayOfMonth();
		System.out.println("今天是:" + year + "-" + month + "-"  + day);
		
		Month monthInstance = localDate.getMonth();
		System.out.println(monthInstance);
		*/
		LocalDate nowDate = LocalDate.now();
		//System.out.println(nowDate);
		LocalTime nowTime = LocalTime.now();
		//System.out.println(nowTime);
		
		LocalDateTime ldt = LocalDateTime.of(nowDate, nowTime);
		System.out.println(ldt.toLocalDate());
		System.out.println(ldt.toLocalTime());
	}

}
